<style>
.btn.btn-danger-o {
    background: transparent;
    color: {{main.syscolor || '#7c1cc9'}};
    border: 1px solid {{main.syscolor || '#7c1cc9'}};
}
</style>
<div class="fui-page fui-page-current page-goods-list" style="background: {{main.syscolor || '#7c1cc9'}};">
<div class='fui-content' style="top:0;background:none;padding-bottom:0">
	<div style="padding:2rem;margin-top:1rem">
		<div class="top" style="margin-bottom:-1.3rem;z-index:108">
			<div class="c">
					<img style="width:3rem;height:3rem;border-radius:100%" src="{{tomedia(pagedata.member.avatar) || '../core/resource/images/no-wxapp.png'}}"  />
			</div>
		</div>
		<div class="fui-code" style="background: linear-gradient(#fdf5d8, #fcd7f7);border-radius: 0.5rem;padding-bottom:1rem">		
			<div class="fui-line-title" style="padding-top:1.3rem" ng-click="tool.clip(pagedata.myfee.paycode)">
					<div>{{pagedata.member.nickname}}</div>
					<div style="color:#999;font-size:0.7rem">[{{pagedata.pcd.city}}]核销码：{{pagedata.myfee.paycode}} <i class="icon icon-copy" style="font-size:0.6rem"></i></div>
			</div>
			<div class="fui-cell-title bold c" style="font-size:0.9rem">
				核销商户：{{pagedata.merch.merchname}}
			</div>
			<div ng-if="!pagedata.order.id" class="fui-cell-group" style="padding:0.5rem;background:none">
				<div class="fui-cell">
						<div class="fui-cell-info">
							<input type="member" placeholder="核销消费金额度" class="fui-input bold" style="font-size:1rem" ng-model="pagedata.post.paymoney" />
						</div>
				</div>
				<div class="fui-cell">
						<div class="fui-cell-info">
							<input type="member" placeholder="核销积分额度" class="fui-input bold" style="font-size:1rem" ng-model="pagedata.post.jifen" />
						</div>
				</div>
			</div>
			<div ng-if="pagedata.order.id" class="fui-list-group goods-list-group" style="background:none;padding:0 0.5rem;margin-top:0"> 
					<div class="fui-list-group-title bold">商品详情</div>
					<div ng-repeat="g in pagedata.order.goods">
						<div class="fui-list">
							<div class="fui-list-media">
								<img ng-src="{{tomedia(g.image)}}" class="round">
							</div>
							<div class="fui-list-inner">
								<div class="text goodstitle">{{g.title}}</div>
								<div class="gray">{{g.subtitle}}</div> 
							</div>
							<div class='fui-list-angle'>
							<span class='marketprice'>￥{{g.price}} x{{g.total || 1}}</span>
							</div>
						</div>
					</div>
					<div class="fui-cellone">
						<div class="fui-cellone-label red" style="width:auto">消费金抵扣（余额<span class="red">{{pagedata.myfee.fee}}</span>）</div>
						<div class="fui-cellone-info"></div>
						<div class="fui-cellone-remark noremark bold">
							<span class='packageprice red'>-￥{{pagedata.order.api_data.di_myfee}}</span>
						</div>
					</div>
					<div class="fui-cellone">
						<div class="fui-cellone-label red" style="width:auto">线下现金支付</div>
						<div class="fui-cellone-info"></div>
						<div class="fui-cellone-remark noremark bold">
							<span class='packageprice red'>￥{{pagedata.order.price}}</span>
						</div>
					</div>
			</div>
			<div class="content-empty" style="margin-top:0.5rem;">
				<a href="javascript:" id="showTooltips" ng-click="pagedata.pay()" class="weui_btn weui_btn_primary" style="border-radius: 1rem;width:  9rem;font-size: .75rem">
					立即核销
				</a>
			</div>
		</div>
		</div>
	</div>
</div>
<script type="text/javascript">
//购买
scope.pagedata.pay=function(){
	scope.post_json('jy_xiaofeelian/hexiao/post/',scope.pagedata.post,function(res){
		scope.message('核销成功！','','jy_merch/manage.index/');
	});	
}
</script>